package version1_0;

/**
 * @program:IntelliJ IDEA
 * @Description:电脑类
 * @author:Mr.CheCheHuiBujianO
 * @data: 2022/7/12 12:42
 */
public class Computer {

    private String computerId;//电脑的游戏id
    private String computerGesture;//电脑出的手势
    private String[] computerGestureGroup = new String[]{"剪刀","石头","布"};


    public String getComputerId() {
        return computerId;
    }

    public void setComputerId() {
        //将我们电脑的Id使用随机数进行一个赋值
        computerId = String.valueOf(Math.random()*100000);
        this.computerId = computerId;
    }

    public String getComputerGesture() {
        return computerGesture;
    }

    public void setComputerGesture() {
        //使用随机数进行进行一个手势选择
        int randomGesture = (int) ((Math.random()*100)% 2);
        computerGesture = computerGestureGroup[randomGesture];
        this.computerGesture = computerGesture;
    }
}
